#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
/*int main() {
	int a = 1;
	int b = 2;
	int c = (a > b, a = b + 10, a, b = a + 1);
	printf("%d", c);
}*/
/*void print(int arr[], int sz) {
	int i = 0;
	for (i = 0; i < sz; i++) {
		printf("%d", arr[i]);
	}
	printf("\n");
}
void reverse(int arr[], int sz) {
	int left = 0;
	int right = sz - 1;
	while (left < right) {
		int tmp = arr[left];
		arr[left] = arr[right];
		arr[right] = tmp;
		left++;
		right--;
	}
}
void init(int arr[], int sz) {
	int i = 0;
	for (i = 0; i < sz; i++) {
		arr[i] = 0;
	}
}
int main() {
	int arr[] = { 0,1,2,3,4,5,6,7,8,9 };
	int sz = sizeof(arr) / sizeof(arr[0]);

	print(arr, sz);
	reverse(arr, sz);
	print(arr, sz);
	init(arr, sz);
	print(arr, sz);
	return 0;
}*/
void BubbleSort(int arr[], int sz) {
	int i = 0; int j = 0;
	for (i = 0; i < sz-1; i++) {
		for (j = 0; j < sz - i - 1; j++) {
			if (arr[j] > arr[j + 1])
			{
				int tem = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = tem;
			}
		}
	}
}
int main() {
	int arr[] = { 10,9,8,7,6,5,4,2,3,1 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	BubbleSort(arr, sz);
	int i = 0;
	for (i = 0; i < sz; i++) {
		printf("%d ", arr[i]);
	}
	return 0;
}